/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view.gui;

/**
 *
 * @author Teao
 */
public class ProfPrincipal extends javax.swing.JFrame {
    
    static final int ALTURA  = 340;
    static final int LARGURA = 640;

    
    /**
     * Creates new form AdmPrincipal
     */
    public ProfPrincipal() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        PProfessor = new javax.swing.JPanel();
        BSair = new javax.swing.JButton();
        BLogoff = new javax.swing.JButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu2 = new javax.swing.JMenu();
        MconsultarAluno = new javax.swing.JMenuItem();
        jMenu4 = new javax.swing.JMenu();
        MConsultarTurma = new javax.swing.JMenuItem();
        jMenu1 = new javax.swing.JMenu();
        MAdicionarAtiv = new javax.swing.JMenuItem();
        MAdicionarNotas = new javax.swing.JMenuItem();
        jMenuItem5 = new javax.swing.JMenuItem();
        jMenu6 = new javax.swing.JMenu();
        MConsultarDisc = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        getContentPane().setLayout(null);

        PProfessor.setLayout(null);
        getContentPane().add(PProfessor);
        PProfessor.setBounds(20, 20, 760, 450);

        BSair.setText("Sair");
        BSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BSairActionPerformed(evt);
            }
        });
        getContentPane().add(BSair);
        BSair.setBounds(550, 490, 210, 60);

        BLogoff.setText("Logoff...");
        BLogoff.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BLogoffActionPerformed(evt);
            }
        });
        getContentPane().add(BLogoff);
        BLogoff.setBounds(40, 490, 210, 60);

        jMenu2.setText("Aluno");

        MconsultarAluno.setText("Consultar");
        MconsultarAluno.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MconsultarAlunoActionPerformed(evt);
            }
        });
        jMenu2.add(MconsultarAluno);

        jMenuBar1.add(jMenu2);

        jMenu4.setText("Turma");

        MConsultarTurma.setText("Consultar");
        MConsultarTurma.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MConsultarTurmaActionPerformed(evt);
            }
        });
        jMenu4.add(MConsultarTurma);

        jMenu1.setText("Atividade");

        MAdicionarAtiv.setText("Adicionar");
        MAdicionarAtiv.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MAdicionarAtivActionPerformed(evt);
            }
        });
        jMenu1.add(MAdicionarAtiv);

        MAdicionarNotas.setText("Adicionar Notas");
        MAdicionarNotas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MAdicionarNotasActionPerformed(evt);
            }
        });
        jMenu1.add(MAdicionarNotas);

        jMenuItem5.setText("Remover");
        jMenu1.add(jMenuItem5);

        jMenu4.add(jMenu1);

        jMenuBar1.add(jMenu4);

        jMenu6.setText("Disciplina");

        MConsultarDisc.setText("Consultar");
        MConsultarDisc.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MConsultarDiscActionPerformed(evt);
            }
        });
        jMenu6.add(MConsultarDisc);

        jMenuBar1.add(jMenu6);

        setJMenuBar(jMenuBar1);

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-829)/2, (screenSize.height-641)/2, 829, 641);
    }// </editor-fold>//GEN-END:initComponents

    private void BSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BSairActionPerformed
        System.exit(0);
    }//GEN-LAST:event_BSairActionPerformed

    private void MConsultarTurmaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MConsultarTurmaActionPerformed
        /* Implementa um jeito de interagir o painel GuiTurmaConsultar
        GuiTurmaConsultar panel = new GuiTurmaConsultar();
        PProfessor.removeAll();
        PProfessor.add(panel);
        PProfessor.repaint();
        panel.setLocation(0,0);
        panel.setSize(LARGURA, ALTURA); */
    }//GEN-LAST:event_MConsultarTurmaActionPerformed

    
    private void MAdicionarAtivActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MAdicionarAtivActionPerformed
        // Implementa a interação entre o PProfessor com o painel GuiAtivAdicionar.
        GuiAtivAdicionar panel = new GuiAtivAdicionar();
        PProfessor.removeAll();
        PProfessor.add(panel);
        PProfessor.repaint();
        panel.setLocation(0,0);
        panel.setSize(LARGURA, ALTURA);
    }//GEN-LAST:event_MAdicionarAtivActionPerformed

    private void BLogoffActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BLogoffActionPerformed
        
        this.setVisible(false);
        TelaLogin janela = new TelaLogin();
        janela.setVisible(true);
    }//GEN-LAST:event_BLogoffActionPerformed

    private void MAdicionarNotasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MAdicionarNotasActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_MAdicionarNotasActionPerformed

    private void MConsultarDiscActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MConsultarDiscActionPerformed
        // TODO add your handling code here:
        
        GuiDiscConsultar panel = new GuiDiscConsultar();
        PProfessor.removeAll();
        PProfessor.add(panel);
        PProfessor.repaint();
        panel.setLocation(0,0);
        panel.setSize(LARGURA, ALTURA);
    }//GEN-LAST:event_MConsultarDiscActionPerformed

    private void MconsultarAlunoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MconsultarAlunoActionPerformed
        // TODO add your handling code here:
        GuiAlunoConsultar panel = new GuiAlunoConsultar();
        PProfessor.removeAll();
        PProfessor.add(panel);
        PProfessor.repaint();
        panel.setLocation(0,0);
        panel.setSize(LARGURA, ALTURA);
    }//GEN-LAST:event_MconsultarAlunoActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(ProfPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(ProfPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(ProfPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(ProfPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ProfPrincipal().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton BLogoff;
    private javax.swing.JButton BSair;
    private javax.swing.JMenuItem MAdicionarAtiv;
    private javax.swing.JMenuItem MAdicionarNotas;
    private javax.swing.JMenuItem MConsultarDisc;
    private javax.swing.JMenuItem MConsultarTurma;
    private javax.swing.JMenuItem MconsultarAluno;
    private javax.swing.JPanel PProfessor;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenu jMenu6;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem5;
    // End of variables declaration//GEN-END:variables
}
